﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;
namespace 作业
{
    public partial class 选择题测试 : System.Web.UI.Page
    {

        private PlaceHolder addProblem(string problem)
        {
            PlaceHolder pl = new PlaceHolder();
            Label lbltitle = new Label();
            lbltitle.Text = problem + ":&nbsp&nbsp&nbsp<br />";
            ph1.Controls.Add(lbltitle);
            for (int i = 0; i < 4; i++)
            {
                RadioButton radio = new RadioButton();
                radio.Text = "答案" + (char)(65 + i) + "&nbsp&nbsp&nbsp";
                radio.GroupName = problem;
                pl.Controls.Add(radio);
            }
            return pl;
        }


        protected void Page_Load(object sender, EventArgs e)
        {
            string[] problem = { "问题1", "问题2", "问题3", "问题4", "问题5", "问题6", "问题7", "问题8", "问题9", "问题10" };
            for (int i = 0; i < 10; i++)
            {
                ph1.Controls.Add(addProblem(problem[i]));
                ph1.Controls.Add(new Literal() { Text = "<br /><br />" });
            }
        }
    }
}